package library.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "librarian")

public class Librarian extends User {
	@DatabaseField
	private boolean admin;
	
	private Librarian(){
		
	}
	
	public Librarian(String name, String password){
		this.userName = name;
		this.password = password;
	}
	
	public boolean checkPassword(String pwd){
		return (pwd.equals(this.password));
	}

    public void setPassword(String password){
        this.password = password;
    }

	public void setAdminRight(boolean isAdmin){
		admin = isAdmin;
	}

	public boolean isAdmin(){
		return admin;
	}
}
